package com.link2room.bumblebee.entity;

import com.link2room.common.entity.BaseEntity;
import org.hibernate.envers.Audited;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;

/**
 * Created by sss on 2016/8/11.
 */

@Entity
public class Demo extends BaseEntity {
    public enum Demo_{
        num,rateId
    }
    private Integer num;
    private String rateId;

    @Basic
    @Column(name = "num", nullable = true)
    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    @Basic
    @Column(name = "rate_id", nullable = false, length = 40)
    public String getRateId() {
        return rateId;
    }

    public void setRateId(String rateId) {
        this.rateId = rateId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Demo demo = (Demo) o;

        if (num != null ? !num.equals(demo.num) : demo.num != null) return false;
        if (rateId != null ? !rateId.equals(demo.rateId) : demo.rateId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = num != null ? num.hashCode() : 0;
        result = 31 * result + (rateId != null ? rateId.hashCode() : 0);
        return result;
    }


}
